package com.wen.system.jwt;

import org.apache.shiro.authc.AuthenticationToken;

import java.util.Date;

//这个就类似UsernamePasswordToken
public class JwtToken implements AuthenticationToken {

    // 过期时间
    private Date  exp;

    // 签发时间
    private Date   iat ;

    private String token;

    public JwtToken(String jwt) {

        this.token = jwt;
    }

    @Override//类似是用户名
    public Object getPrincipal() {

        return token;
    }

    @Override//类似密码
    public Object getCredentials() {

        return token;
    }
    //返回的都是jwt


    public Date getExp() {
        return exp;
    }

    public void setExp(Date exp) {
        this.exp = exp;
    }

    public Date getIat() {
        return iat;
    }

    public void setIat(Date iat) {
        this.iat = iat;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}